<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户信息</title>
</head>
<body>

<%
	String method = request.getParameter("method");
	String actionStr = "";
	String buttonStr = "";
	String title     = "";
	String user      = "";
	
	if(method.equals("create")){
		actionStr = "UserInfo?method=create";
		buttonStr = "添加";
		title     =  "创建新用户";
		
	}else if(method.equals("update")){
		actionStr = "UserInfo?method=update";
		buttonStr = "修改";
		title     =  "修改用户密码";
		user      = request.getParameter("username");
	}
%>

<p><%=title %><p>
	<form action=<%=actionStr %> method="post">
		<div>
		  <p>账号：
          <input type="text" name="username"  placeholder="请输入新的用户名！" value=<%=user %>></p>
        </div>
        <div>
          <p>密码：
          <input type="text" name="password"  placeholder="请输入新用户的用户密码！"></p>
        </div>
        
        <div>
          <button type="submit" class="submit_button"><%=buttonStr %></button>
        </div>
        
    </form>
</body>
</html>